<template>

                <!--最大div-->
                <div style="margin-top: -10px">
                    <!--新建栏-->
                    <div style="border:1px solid #BFBFBF;padding: 10px;background-color: white;margin-top: 10px;height: 40px">
                        <el-row :gutter="24">
                            <el-col :span="2">
                                <span style="font-size: 18px;line-height:40px;margin-left: 5px">审批</span>
                            </el-col>
                            <el-col :span="7">
                                <el-select v-model="value7" @change="selectsp" style="width: 150px;margin-left: 20px" placeholder="全部商机">
                                    <el-option-group
                                            v-for="group in options3"
                                            :key="group.label"
                                            :label="group.label">
                                        <el-option
                                                v-for="item in group.options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-option-group>
                                </el-select>
                                <el-button style="background-color: #F05050;color: white;margin-left: 10px;" @click="cancelseek" icon="el-icon-back" v-show="seek" size="mini" round>解除搜索</el-button>
                            </el-col>
                            <el-col :span="9">
                                <el-input placeholder="请输入搜索的信息" v-model="spr"  @keyup.enter.native="ajaxLoginApi()" style="width: 250px;">
                                    <i slot="suffix" class="el-input__icon el-icon-search"></i>
                                </el-input>
                            </el-col>
                        </el-row>
                    </div>


                    <!--表格数据框-->
                    <div style="margin-top: 10px;border: 1px solid #BFBFBF;background-color: white">
                        <div style="width: 100%;height: 40px;background-color: white;border-bottom: 1px solid #EBEEF5">
                            <div class="operate" v-show="cjy">
                                <div class="selected—title" style="border-right: 0px ;width: 100%;">
                                    场景：<span>{{value7}}</span>
                                </div>
                            </div>
                            <div class="operate" v-show="cje">
                                <div class="selected—title" >
                                    已选中<span class="selected—count">{{count}}</span>项
                                </div>
                                <div  class="selected—title2" v-show="isOne">
                                    <span @click="isAddRecord=true"><i class="el-icon-circle-plus-outline"></i>添加跟进记录</span>
                                </div>
                                <div  class="selected—title1" v-show="isOne">
                                    <span><i class="el-icon-edit"></i>修改</span>
                                </div>
                                <div  class="selected—title1">
                                    <span><i class="el-icon-delete"></i>删除</span>
                                </div>
                            </div>
                        </div>
                        <el-table
                                :data="xsfytable.slice((currentPage-1)*pageSize,currentPage*pageSize)"
                                style="width: 100%"
                                max-height="450"
                                :default-sort = "{prop: 'date', order: 'descending'}"
                                @selection-change="handleSelectionChange">
                            <el-table-column
                                    type="selection"
                                    width="50"
                                    prop="spId"
                                    align="center">
                            </el-table-column>
                            <el-table-column
                                    prop="spZhuti"
                                    label="申请主题"
                                    align="center"
                                    width="120">
                            </el-table-column>
                            <el-table-column
                                    prop="spShuoming"
                                    label="申请类型"
                                    align="center"
                                    width="120">
                            </el-table-column>
                            <el-table-column
                                    prop="spShenqingren"
                                    label="申请人"
                                    align="center"
                                    >
                            </el-table-column>
                            <el-table-column
                                    label="创建日期"
                                    align="center">
                                <template slot-scope="d">
                                    {{d.row.spSpshenqindate | formatDate}}
                                </template>
                            </el-table-column>
                            <el-table-column
                                    prop="spSpzt"
                                    label="状态"
                                    align="center"
                                    >
                            </el-table-column>
                            <el-table-column
                                    fixed="right"
                                    label="操作"
                                    align="center"
                                    >
                                <template slot-scope="d">
                                    <!--如果是三个标签，后两个标签padding-left: 10px;-->
                                    <i @click="xiugai(d.row)" style="font-size:18px;color: #409EFF" class="el-icon-edit"></i>
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                    <!--分页框-->
                    <div style="margin-top: 15px;border: 1px solid #BFBFBF;padding: 10px;background-color: white">
                        <div style="text-align: center">
                            <el-pagination
                                    @size-change="handleSizeChange"
                                    @current-change="handleCurrentChange"
                                    :current-page.sync="currentPage"
                                    :page-sizes="sizes"
                                    :page-size="pageSize"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="xsfytable.length"
                            >
                            </el-pagination>
                        </div>
                    </div>

                    <!--修改框-->
                    <el-dialog
                            title="审批"
                            :visible.sync="xgsp"
                            width="60%"
                    >
                        <div class="shugan"></div>
                        <span style="margin-left: 10px;font-size: 14px;">基本信息</span>
                        <br/>
                        <br/>
                        <el-form style="margin-top:5px;margin-left: 40px;" size="mini" :model="xgshenpi" >
                            <el-row>
                                <el-col :span="11">
                                    <el-form-item style="width:250px;">
                                        <label slot="label" style="font-size: 13px">审批类型：</label><br/>
                                        <el-input :disabled="true" v-model="xgshenpi.spShuoming"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item style="width:250px" >
                                        <label slot="label" style="font-size: 13px">审核状态：</label><br/>
                                        <el-radio v-model="xgshenpi.spSpzt"  label="未审核">未审核</el-radio>
                                        <el-radio v-model="xgshenpi.spSpzt" label="已审核">已审核</el-radio>
                                        <el-radio v-model="xgshenpi.spSpzt"  label="否决">否决</el-radio>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="11">
                                    <el-form-item style="width:350px;">
                                        <label slot="label" style="font-size: 13px;">申请时间：</label><br/>
                                        <el-date-picker type="date" placeholder="选择日期"
                                                        v-model="xgshenpi.spSpshenqindate"
                                                        value-format="yyyy-MM-dd" format="yyyy-MM-dd"
                                                        style="width: 250px" :disabled="true">
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item style="width:250px" >
                                        <label slot="label" style="font-size: 13px">申请人：</label><br/>
                                        <el-input size="small"  v-model="xgshenpi.spShenqingren" :disabled="true"></el-input>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row>
                                <el-col :span="11">
                                    <el-form-item style="width:250px;">
                                        <label slot="label" style="font-size: 13px">审核人：</label><br/>
                                        <el-input :disabled="true" v-model="xgshenpi.qempFrom.empName"></el-input>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="8">
                                    <el-form-item style="width:250px" >
                                        <label slot="label" style="font-size: 13px">审核时间：</label><br/>
                                        <el-date-picker type="date" placeholder="选择日期"
                                                        value-format="yyyy-MM-dd" format="yyyy-MM-dd"
                                                        v-model="xgshenpi.spShenqindate"
                                                        :disabled="true"
                                                        style="width: 250px">
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-form>
                        <el-row>
                            <el-col :span="24">
                                <!--销售费用申请表格详情 -->
                                <el-table
                                        v-show="xsfyxq"
                                        :data="dd"
                                        style="width: 788px;margin-left: 40px"
                                        :header-cell-style="{background:'#eef1f6',color:'#333',fontSize:'12px',fontWeight:'600px',padding:'0px'}"
                                        :header-row-style="{height:'60px'}"
                                        :row-style="{height:'50px'}"
                                        :cell-style="{padding:'0px'}"
                                >
                                    <el-table-column
                                            prop="spShenqingren"
                                            label="费用申请人"
                                            :show-overflow-tooltip="true"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="申请时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.spSpshenqindate | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="lxsfy.xsfyJe"
                                            label="费用金额"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="lxsfy.xsfyLb"
                                            label="费用用途"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="lxsfy.xsfySpzt"
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="lxsfy.xsfyBx"
                                            label="报销"
                                            align="center"
                                    >
                                    </el-table-column>
                                </el-table>
                                <!--出差申请表格详情 -->
                                <el-table
                                        v-show="ccxq"
                                        :data="dd"
                                        style="width: 788px;margin-left: 40px"
                                        :header-cell-style="{background:'#eef1f6',color:'#333',fontSize:'12px',fontWeight:'600px',padding:'0px'}"
                                        :header-row-style="{height:'60px'}"
                                        :row-style="{height:'50px'}"
                                        :cell-style="{padding:'0px'}"
                                >
                                    <el-table-column
                                            prop="spShenqingren"
                                            label="出差申请人"
                                            :show-overflow-tooltip="true"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="申请时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.spSpshenqindate | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="lchucha.ccZhuti"
                                            label="主题"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="lchucha.ccDdykehu"
                                            label="客户"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="lchucha.ccMdd"
                                            label="目的地"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="lchucha.ccZt"
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                </el-table>
                                <!--换货申请表格详情 -->
                                <el-table
                                        v-show="huanhuoztxq"
                                        :data="dd"
                                        style="width: 788px;margin-left: 40px"
                                        :header-cell-style="{background:'#eef1f6',color:'#333',fontSize:'12px',fontWeight:'600px',padding:'0px'}"
                                        :header-row-style="{height:'60px'}"
                                        :row-style="{height:'50px'}"
                                        :cell-style="{padding:'0px'}"
                                >
                                    <el-table-column
                                            prop="zbarter.barterTheme"
                                            label="换货单号"
                                            :show-overflow-tooltip="true"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="申请时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.spSpshenqindate | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="zbarter.barterNo"
                                            label="换货编号"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="换货时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.zbarter.barterTime | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="zbarter.barterOperator"
                                            label="负责人"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="zbarter.barterAudit"
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                </el-table>
                                <!--订单申请表格详情 -->
                                <el-table
                                        v-show="ddxq"
                                        :data="dd"
                                        style="width: 788px;margin-left: 40px"
                                        :header-cell-style="{background:'#eef1f6',color:'#333',fontSize:'12px',fontWeight:'600px',padding:'0px'}"
                                        :header-row-style="{height:'60px'}"
                                        :row-style="{height:'50px'}"
                                        :cell-style="{padding:'0px'}"
                                >
                                    <el-table-column
                                            prop="spShenqingren"
                                            label="申请人"
                                            :show-overflow-tooltip="true"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="申请时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.spSpshenqindate | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="zorder.orderTheme"
                                            label="主题"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="zorder.orderTotal"
                                            label="订单总金额"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="zorder.orderReturned"
                                            label="订单剩余回款金额"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                </el-table>
                                <!--合同申请表格详情 -->
                                <el-table
                                        v-show="hetongxq"
                                        :data="dd"
                                        style="width: 788px;margin-left: 40px"
                                        :header-cell-style="{background:'#eef1f6',color:'#333',fontSize:'12px',fontWeight:'600px',padding:'0px'}"
                                        :header-row-style="{height:'60px'}"
                                        :row-style="{height:'50px'}"
                                        :cell-style="{padding:'0px'}"
                                >
                                    <el-table-column
                                            prop="spShenqingren"
                                            label="申请人"
                                            :show-overflow-tooltip="true"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="申请时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.spSpshenqindate | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="zcontract.conTheme"
                                            label="主题"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="zcontract.conTotal"
                                            label="总金额"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="zcontract.mySignatory"
                                            label="我方签约人"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                </el-table>
                                <!--退货申请表格详情 -->
                                <el-table
                                        v-show="caigouxq"
                                        :data="dd"
                                        style="width: 788px;margin-left: 40px"
                                        :header-cell-style="{background:'#eef1f6',color:'#333',fontSize:'12px',fontWeight:'600px',padding:'0px'}"
                                        :header-row-style="{height:'60px'}"
                                        :row-style="{height:'50px'}"
                                        :cell-style="{padding:'0px'}"
                                >
                                    <el-table-column
                                            prop="spShenqingren"
                                            label="申请人"
                                            :show-overflow-tooltip="true"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="申请时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.spSpshenqindate | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="qpurchaseEntity.purchaseZhuti"
                                            label="主题"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="qpurchaseEntity.purchaseDh"
                                            label="采购单号"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="qpurchaseEntity.purchaseCgje"
                                            label="采购金额"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="qpurchaseEntity.purchaseZt"
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                </el-table>
                                <!--报价申请详情 -->
                                <el-table
                                        v-show="baojianxq"
                                        :data="dd"
                                        style="width: 788px;margin-left: 40px"
                                        :header-cell-style="{background:'#eef1f6',color:'#333',fontSize:'12px',fontWeight:'600px',padding:'0px'}"
                                        :header-row-style="{height:'60px'}"
                                        :row-style="{height:'50px'}"
                                        :cell-style="{padding:'0px'}"
                                >
                                    <el-table-column
                                            prop="spShenqingren"
                                            label="申请人"
                                            :show-overflow-tooltip="true"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="申请时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.spSpshenqindate | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="doffer.offerTheme"
                                            label="主题"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="doffer.offerNumbers"
                                            label="报价单号"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="doffer.offerMoney"
                                            label="报价金额"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="doffer.offerAudit"
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                </el-table>


                                <!--退货申请详情 -->
                                <el-table
                                        v-show="tuihuoxq"
                                        :data="dd"
                                        style="width: 788px;margin-left: 40px"
                                        :header-cell-style="{background:'#eef1f6',color:'#333',fontSize:'12px',fontWeight:'600px',padding:'0px'}"
                                        :header-row-style="{height:'60px'}"
                                        :row-style="{height:'50px'}"
                                        :cell-style="{padding:'0px'}"
                                >
                                    <el-table-column
                                            prop="spShenqingren"
                                            label="申请人"
                                            :show-overflow-tooltip="true"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            label="申请时间"
                                            align="center"
                                    >
                                        <template slot-scope="d">
                                            {{d.row.spSpshenqindate | formatDate}}
                                        </template>
                                    </el-table-column>
                                    <el-table-column
                                            prop="doffer.offerTheme"
                                            label="主题"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="doffer.offerNumbers"
                                            label="报价单号"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="doffer.offerMoney"
                                            label="报价金额"
                                            align="center"
                                    >
                                    </el-table-column>
                                    <el-table-column
                                            prop="doffer.offerAccept"
                                            label="状态"
                                            align="center"
                                    >
                                    </el-table-column>
                                </el-table>
                            </el-col>
                        </el-row>
                        <span slot="footer" class="dialog-footer">
                            <el-button @click="quxiao" >取 消</el-button>
                            <el-button type="primary" @click="queding">确 定</el-button>
                          </span>
                    </el-dialog>

                </div>
</template>
<script>
    import {formatTimeToStr} from '../router//format.js'
    export default {
        name: "Lshenpi",
        data() {
            return {
                spr:'',
                multipleTable: [],//存放选中值的数组
                isOne:true,//选中项为1就出现添加跟进记录和修改
                //解除搜索是否显示
                seek:false,
                //下拉选择框
                xgsp:false,
                options3: [{
                    options: [ {
                        value: '报价申请',
                        label: '报价申请'
                    },{
                        value: '销售费用申请',
                        label: '销售费用申请'
                    }, {
                        value: '出差申请',
                        label: '出差申请'
                    },{
                        value: '换货申请',
                        label: '换货申请'
                    }, {
                        value: '合同申请',
                        label: '合同申请'
                    }, {
                        value: '订单申请',
                        label: '订单申请'
                    }, {
                        value: '退货申请',
                        label: '退货申请'
                    }, {
                        value: '采购申请',
                        label: '采购申请'
                    }]
                }],
                value7: '报价申请',
                //场景一
                cjy:true,
                //场景二
                cje:false,
                //销售费用表格
                xsfytable:[],
                //分页
                totalSize:10,
                pageSize:5,
                currentPage:1,
                sizes:[5, 10, 15, 20],
                xgshenpi:{
                    spId:0,//审批id
                    spTabid:0,//审批表id
                    spShuoming:'',//申请说明
                    spSpshenqindate:'',//审批申请时间
                    spShenqingren:'',//申请人
                    spShenqindate:new Date(),//审批时间
                    sp_Fojuyy:'',//否决原因
                    spSpzt:'',//审批状态
                    qempFrom:{
                        empId:2,
                        empName:'小邓'
                    },//员工对象
                },
                xgid:0,
                xsfyxq:false,
                ccxq:false,
                huanhuoztxq:false,
                hetongxq:false,
                ddxq:false,
                tuihuoxq:false,
                caigouxq:false,
                baojianxq:false,
                dd:[]
            }
        }, methods: {
            quxiao(){
                this.dd=[]
                this.xgsp =false;
            },
            guanbi(){
                this.xsfyxq=false,
                this.ccxq=false;
                this.huanhuoztxq=false;
                this.ddxq=false;
                this.hetongxq=false;
                this.tuihuoxq=false;
                this.caigouxq=false;
                this.baojianxq=false;
                this.dd=[];
                this.xgid='';
            },
            //关闭表格
            //回车查询
            ajaxLoginApi(){
                this.$axios.get(
                    "http://localhost:8088/vue/selectsp",{params:{vv:this.value7,spr:this.spr}}
                ).then(v=>{
                    this.xsfytable=v.data.lshenpis;
                }).catch();
            },
            queding(){
              this.quxiao();
                // var funs=JSON.stringify({xgshenpi:this.xgshenpi});
                // window.console.log("funs",funs)
                // this.$axios.post("http://localhost:8088/vue/addlshenpi",this.qs.stringify(
                //     {funs:funs})).then(()=>{
                //     this.$message({
                //         showClose: true,
                //         type: 'success',
                //         message: '新增成功!',
                //     });
                // }).catch(()=>{
                //     this.$message({
                //         showClose: true,
                //         message: '新增失败',
                //         type: 'error'
                //     });
                // });



                this.$axios.get("http://localhost:8088/vue/xgsp",{params:{
                    spzt:this.xgshenpi.spSpzt,empid:19,date:this.xgshenpi.spShenqindate,spid:this.xgshenpi.spId}
                }).then(()=>{
                    this.$message({
                        showClose: true,
                        type: 'success',
                        message: '新增成功!',
                    });
                }).catch(()=>{
                    this.$message({
                        showClose: true,
                        message: '新增失败',
                        type: 'error'
                    });
                });

                if(this.xgshenpi.spShuoming=="销售费用申请"){
                    this.$axios.get("http://localhost:8088/vue/xgxsfy",{params:{
                            spzt:this.xgshenpi.spSpzt,xsfyid:this.xgid}
                    }).then().catch();
                }else if(this.xgshenpi.spShuoming=="出差申请"){
                    this.$axios.get("http://localhost:8088/vue/xgchucha",{params:{
                            spzt:this.xgshenpi.spSpzt,ccid:this.xgid}
                    }).then().catch();
                }else if(this.xgshenpi.spShuoming=="换货申请"){
                    this.$axios.get("http://localhost:8088/vue/xghuanhuo",{params:{
                            spzt:this.xgshenpi.spSpzt,huamhuoid:this.xgid}
                    }).then().catch();
                }else if(this.xgshenpi.spShuoming=="退货申请"){
                    this.$axios.get("http://localhost:8088/vue/xgtuihuo",{params:{
                            spzt:this.xgshenpi.spSpzt,tuihuoid:this.xgid}
                    }).then().catch();
                }else if(this.xgshenpi.spShuoming=="报价申请"){
                    this.$axios.get("http://localhost:8088/vue/xgdoffer",{params:{
                            spzt:this.xgshenpi.spSpzt,baojiaid:this.xgid}
                    }).then().catch();
                }else if(this.xgshenpi.spShuoming=="采购申请"){
                    this.$axios.get("http://localhost:8088/vue/xgcaigou",{params:{
                            spzt:this.xgshenpi.spSpzt,caigouid:this.xgid}
                    }).then().catch();
                }

                this.value7=this.xgshenpi.spShuoming;
                this.selectsp();

            },
            //按条件查询申请信息
            selectsp(){
                this.$axios.get(
                    "http://localhost:8088/vue/selectsp",{params:{vv:this.value7,spr:this.spr}}
                ).then(v=>{
                    this.xsfytable=v.data.lshenpis;
                }).catch();
            },
            xiugai(d){
                this.guanbi();
                this.dd.push(d);
                window.console.log("d",d)
                this.xgsp =true;
                this.xgshenpi.spId=d.spId;
                this.xgshenpi.spTabid=d.spTabid;
                this.xgshenpi.spShuoming=d.spShuoming;
                this.xgshenpi.spSpshenqindate=d.spSpshenqindate;
                this.xgshenpi.spShenqingren=d.spShenqingren;
                this.xgshenpi.spSpzt=d.spSpzt;
                this.xgid=d.spTabid;
                window.console.log("xgid",this.xgid)
                if(d.spShuoming=="销售费用申请"){
                    this.xsfyxq=true;
                }else if(d.spShuoming=="出差申请"){
                    this.ccxq=true;
                }else if(d.spShuoming=="换货申请"){
                    this.huanhuoztxq=true;
                }else if(d.spShuoming=="合同申请"){
                    this.hetongxq=true;
                }else if(d.spShuoming=="订单申请"){
                    this.ddxq=true;
                }else if(d.spShuoming=="退货申请"){
                    this.tuihuoxq=true;
                }else if(d.spShuoming=="采购申请"){
                    this.caigouxq=true;
                }else if(d.spShuoming=="报价申请"){
                    this.baojianxq=true;
                }

            },
            /*当前页方法*/
            handleSizeChange: function (size) {
                this.pageSize = size;
                console.log(this.pageSize)  //每页下拉显示数据
            },
            handleCurrentChange: function(currentPage){
                this.currentPage = currentPage;
                console.log(this.currentPage)  //点击第几页
            },
            //复选框选中的
            handleSelectionChange(val) {
                this.multipleTable = val;//  this.multipleTable 选中的值
                if(this.multipleTable.length>0){
                    this.cjy=false;//第一行隐藏
                    this.cje=true;//批量操作栏出现
                }
                //选中项大于1不能执行添加跟进记录和修改按钮
                if(this.multipleTable.length>1){
                    this.isOne=false;
                }else if(this.multipleTable.length==0){//选中项为0时
                    this.cjy=true;//第一行出现
                    this.cje=false;//批量操作栏隐藏
                }else{
                    this.isOne=true;//添加跟进记录和修改出现
                }
                window.console.log(val);
            },
            /*选择类型商机方法*/
            changebusni(){
                if(this.value7!=''){
                    this.seek=true;
                }
            },
            /*解除选择类型商机方法*/
            cancelseek(){
                this.value7='';
                this.seek=false;
            }
        },
        computed:{
            count(){
                return this.multipleTable.length
            }
        },
        created:function(){
            //调用分页
            this.selectsp();

        },
        filters: {
            formatDate: function (time) {
                if (time != null && time != "") {
                    var date = new Date(time);
                    return formatTimeToStr(date, "yyyy-MM-dd");
                } else {
                    return "";
                }
            },
        }

    }
</script>
<style scoped>

    .addview:hover{
        color: white;
    }
    a{
        text-decoration: none;
        color: #409EFF;
    }
    a:hover{
        color: white;
    }
    .busin:hover{
        color: #3E84E9;
        cursor:pointer;
    }
    .businame{
        color: #606266;
    }
    .businame:hover{
        color: #409EFF;
        cursor:pointer;
    }
    .operate{
        font-size: 12px;
        height: 40px;
        padding: 0 20px;
        color: #777;
        background: white;
    }
    .selected—title{
        margin-top: 15px;
        margin-left: -6px;
        border-right: 1px solid #e6e6e6;
        width: 86px;
        height:20px;
        float: left;
    }
    .selected—title1{
        margin-top: 15px;
        border-right: 1px solid #e6e6e6;
        width: 86px;
        height:20px;
        float: left;
        cursor: pointer;
    }

    .selected—title1 span{
        margin-left: 24px;
    }
    .selected—title1 span:hover{
        color:#409eff;
    }
    .selected—title2{
        margin-top: 15px;
        border-right: 1px solid #e6e6e6;
        width: 129px;
        height:20px;
        float: left;
        cursor: pointer;
    }

    .selected—title2 span{
        margin-left: 24px;
    }
    .selected—title2 span:hover{
        color:#409eff;
    }

    .el-select>>>input{
        height: 35px;
    }
    .custom-tree-node {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 14px;
        padding-right: 28px;
    }
    .myul{
        list-style: none;
        margin-top: 3px;
    }
    .myul li{
        margin-left: -39px;
        margin-top: 5px;
        width: 129px;
        text-align: center;
        height: 30px;
        line-height: 35px;
    }
    .myul li:hover{
        background-color: #BFBFBF;
        cursor: pointer;
    }
    .shugan{
        border-left-color: rgb(70, 205, 207);
        border-left-width: 1.8px;
        height: 10px;
        border-left-style: solid;
        display: inline;
        font-size: 13px;
        margin-left: 25px;
    }
    .el-cascader--mini {
        font-size: 12px;
        line-height: 35px;
    }
</style>